<ion-header class="ion-no-border">
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-back-button defaultHref="/home/class/detail/members/create-signin"></ion-back-button>
    </ion-buttons>
    <ion-title>{{title}}</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>
  <ion-slides #createSigninSlides>
    <ion-slide>
      <ion-list *ngIf="type=='password'" style="width: 80%;">
        <ion-list-header>
          请输入签到密码
        </ion-list-header>
        <ion-item>
          <ion-input required placeholder="请输入" [(ngModel)]="password"></ion-input>
        </ion-item>
        <ion-button color="primary" class="button fillet-boder" [disabled]="isStart || !password" (click)="start()">开始签到</ion-button>
        <ion-button color="danger" expand="outline" class="button fillet-boder" [disabled]="!isStart" (click)="finish()">结束签到</ion-button>
      </ion-list>
    </ion-slide>
    <ion-slide>
      <div style="width: 100%;">
        <ion-list>
          <ion-list-header>
            未签到
          </ion-list-header>
          <ion-item *ngFor="let item of absences">
            <ion-label>
              <h2>{{item.studentName}}</h2>
              <p>{{item.studentNumber}}</p>
            </ion-label>
            <ion-text slot="end">缺勤</ion-text>
          </ion-item>
        </ion-list>
        <ion-list>
          <ion-list-header>
            已签到
          </ion-list-header>
          <ion-item *ngFor="let item of attendances">
            <ion-label>
              <h2>{{item.studentName}}</h2>
              <p>{{item.studentNumber}}</p>
            </ion-label>
            <ion-text slot="end">{{item.time}}</ion-text>
          </ion-item>
        </ion-list>
      </div>
    </ion-slide>
  </ion-slides>
</ion-content>
